package Cars;

public class Car {

	protected String model;
	private double maxSpeed;
	protected double currentSpeed;
	protected int currentGear;
	protected int numberOfDoors;
	private String idNumber;
	protected boolean isSportCar;
	protected Person owner;
	protected String type = "Just a car";

	
	Car(int maxSpeed){
		this.maxSpeed= maxSpeed;
	}
	void changeOwner(Person newOwner) {
		this.owner.name = newOwner.name;
	}

	void startEngine() {

	}

	void changeGear(int gear) {
		this.currentGear = gear;
	}

	void accelerate(double speed) {
		if (this.maxSpeed < this.currentSpeed + speed) {
			this.currentSpeed = this.maxSpeed;
		} else
			this.currentSpeed += speed;
	}

}
